// hook:useState

function useState<T>(state: T): [T, (newState: T) => void] {
    let currentState = state
    const changeState = (newState: T) => {
        currentState = newState
    }
    // const arr: any[] = [currentState, changeState]
    // const arr: [T, (newState: T) => void] = [currentState, changeState]
    return [currentState, changeState]
}

const [counter, changeCounter] = useState(10)
const [title, setTitle] = useState('title1')


export { }